<?
#  phpinfo(); exit;
  
  session_name('NZSession');
  session_start();
  session_register('topic');
  session_register('subtopic');
  session_register('indexdone');
  
  # Initial pages to display
  $_SESSION['topic'] = 'start';
  $_SESSION['subtopic'] = false;
  $_SESSION['indexdone'] = true;
  
  include('data/f_db.inc.php');
  
  /*if ($_GET['jumpto']) {
      $_SESSION['topic'] = 'blog';  
      $query = '?content=blog&NID='.$_GET['jumpto'];
  } else if ($_GET['jumptogallery']) {
      $_SESSION['topic'] = 'galleries';  
      $query = '?content=galleries&GID='.$_GET['jumptogallery'];
  } else if ($_GET['unsubscribe']) {
      $_SESSION['topic'] = 'about';
      mq("UPDATE newsletter SET Unsubscribed=NOW() WHERE UID=".($_GET['unsubscribe']+0));
      $query = '?content=about&displayunsubscribed';
  } else {
      $_SESSION['topic'] = 'about';
      $query = '?content=about';                            
  } */
  
  include('data/lib_f_protocol.inc.php');
  // TODO: Update Domain Name!
  if ($_SERVER['HTTP_HOST'] != 'www.uccc.canterbury.ac.nz' && $_SERVER['SERVER_ADDR'] != '127.0.0.1') {
     protocolReferrer($_SERVER['HTTP_HOST']);
     header('location:http://www.uccc.canterbury.ac.nz');
  } else if ($_SERVER['HTTP_REFERER']) {
     protocolReferrer($_SERVER['HTTP_REFERER']);
  }
  protocolCurrentIP();
  header('location:uccc.php');
?>